const Router = require('koa-router')
const multer = require('koa-multer')
const uploadRouter = new Router()
const upload = multer(
  { 
    dest: './uploads/' 
  }
)
uploadRouter.post('/upload', upload.single('file'), (ctx, next) => {
  console.log('文件上传成功', ctx.req.file)
  ctx.response.body = '文件上传'
})
module.exports = uploadRouter
